<!DOCTYPE html>

<html class="no-js">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title></title>
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <script src="https://cdn.staticfile.org/axios/0.19.0-beta.1/axios.js"></script>
  <script src="https://cdn.staticfile.org/vue/2.5.17/vue.js"></script>
  <link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.13.0/theme-chalk/index.css" />
  <script src="https://cdn.staticfile.org/element-ui/2.13.0/index.js"></script>
  <link rel="stylesheet" href="https://cdn.staticfile.org/animate.css/3.7.0/animate.min.css" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@smallwei/avue@1.6.1/lib/theme-chalk/index.css">
  <script src="https://cdn.jsdelivr.net/npm/@smallwei/avue@1.6.1/lib/index.js"></script>
</head>

<body>
  <div id="app">
    <avue-tabs :option="option" @change="handleChange"></avue-tabs>
    <avue-form v-if="['jyxx','jbxx'].includes(item.prop)" :option="item.option" v-model="form"> </avue-form>
    <avue-crud v-else-if="['sbxx'].includes(item.prop)" :option="item.option" :data="data"></avue-crud>
  </div>
</body>
<script>
  new Vue({
    el: '#app',
    methods: {
      handleChange(item) {
        this.item = item;
      }
    },
    data() {
      return {
        form: {},
        data: [],
        item: {},
        option: {
          column: [
            {
              label: '基本信息',
              prop: 'jbxx',
              option: {
                labelWidth: 100,
                column: [
                  {
                    label: '企业名称'
                  },
                  {
                    label: '企业性质',
                    type: 'radio',
                    dicData: [
                      {
                        label: '国企'
                      },
                      {
                        label: '民营'
                      }
                    ]
                  },
                  {
                    label: '成立日期',
                    type: 'date'
                  },
                  {
                    label: '法定代表人',
                  },
                  {
                    label: '联系方式',
                  },
                  {
                    label: '地址',
                  },
                  {
                    label: '注册资本',
                  },
                  {
                    label: '办公租赁面积'
                  },
                  {
                    label: '办公自有面积'
                  },
                ]
              }
            },
            {
              label: '经营信息',
              prop: 'jyxx',
              option: {
                labelWidth: 110,
                column: [
                  {
                    label: '主营行业'
                  },
                  {
                    label: '主要产品'
                  },
                  {
                    label: '企业生产规律'
                  },
                  {
                    label: '主营产品份额'
                  },
                  {
                    label: '上年度每月用电量'
                  },
                  {
                    label: '技术先进性'
                  }
                ]
              }
            },
            {
              label: '设备信息',
              prop: 'sbxx',
              option: {
                column: [
                  {
                    label: '设备型号',
                  },
                  {
                    label: '标准名称'
                  },
                  {
                    label: '设备生产日期'
                  },
                  {
                    label: '设备价值'
                  },
                  {
                    label: '操作人员配备比'
                  },
                  {
                    label: '设备图片'
                  },
                  {
                    label: '额定功率'
                  },
                  {
                    label: '平均每月用电量'
                  }
                ]
              }
            }
          ]
        }
      };
    }
  })
</script>

</html>